﻿@model Demo.Model.Employee

@{
    ViewBag.Title = "Edit";
}

<h2>Edit an existing employee</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset class="form-horizontal">
        <legend>Employee</legend>

        @Html.HiddenFor(model => model.EmployeeId)
    
        <div class="row">
            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.FirstName)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.FirstName)
                        @Html.ValidationMessageFor(model => model.FirstName)
                    </div>
                </div>
            </div>

            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.LastName)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.LastName)
                        @Html.ValidationMessageFor(model => model.LastName)
                    </div>
                </div>

            </div>
        </div>

        <div class="row">
            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.TitleOfCourtesy)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.TitleOfCourtesy)
                        @Html.ValidationMessageFor(model => model.TitleOfCourtesy)
                    </div>
                </div>
            </div>

            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Title)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Title)
                        @Html.ValidationMessageFor(model => model.Title)
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.BirthDate)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.BirthDate)
                        @Html.ValidationMessageFor(model => model.BirthDate)
                    </div>
                </div>
            </div>

            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.HireDate)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.HireDate)
                        @Html.ValidationMessageFor(model => model.HireDate)
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Salary)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Salary)
                        @Html.ValidationMessageFor(model => model.Salary)
                    </div>
                </div>
            </div>

            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.AnnualBonus)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.AnnualBonus)
                        @Html.ValidationMessageFor(model => model.AnnualBonus)
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.CompanyEmail)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.CompanyEmail)
                        @Html.ValidationMessageFor(model => model.CompanyEmail)
                    </div>
                </div>
            </div>

            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.CompanyNetworkUsername)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.CompanyNetworkUsername)
                        @Html.ValidationMessageFor(model => model.CompanyNetworkUsername)
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="span6">
                <div class="control-group">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.CompanyNetworkPassword)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.CompanyNetworkPassword)
                        @Html.ValidationMessageFor(model => model.CompanyNetworkPassword)
                    </div>
                </div>
            </div>

            <div class="span6">
            </div>
        </div>

        <p>
            <input type="submit" value="Save" class="btn btn-primary" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
